<extend name="Public/base" />
<block name="head">
</block>
<block name="body">
<div class="m-tab s-tab">
	<h2 class="u-tt">用户行为管理</h2>
	<ul>
		<li><a href="{:U('index')}">行为列表</a></li>
		<li class="z-crt"><a href="javascript:;">{$meta_title}</a></li>
	</ul>
</div>
<div class="m-form">
	<form name="" action="{:U($action)}" method="post" id="form">
		<fieldset>
			<div class="formitm">
				<label class="lab">行为标识：</label>
				<div class="ipt">
					<input name="name" type="text" class="u-ipt u-ipt-5" value="{$info.name}" maxlength="18" datatype="s2-18" errormsg="输入行为标识 英文字母 至少2个字符,最多18个字符！" placeholder="行为标识 英文字母"/>
					<p></p>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">行为名称：</label>
				<div class="ipt">
					<input name="title" type="text" class="u-ipt u-ipt-5" value="{$info.title}" maxlength="30" placeholder="输入行为名称"/>
					<p></p>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">行为类型：</label>
				<div class="ipt">
					<select class="u-slt" name="type" datatype="*">
						<volist name=":get_action_type(null,true)" id="vo">
							<option value="{$key}">{$vo}</option>
						</volist>
					</select>
					<span>选择行为类型</span>
					<p></p>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">行为描述：</label>
				<div class="ipt">
					<textarea name="remark" class="u-tta u-tta-6" placeholder="行为描述">{$info.remark}</textarea>
					<p></p>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">行为规则：</label>
				<div class="ipt">
					<textarea name="rule" class="u-tta u-tta-6" placeholder="行为规则，不写则只记录日志">{$info.rule}</textarea>
					<p></p>
					<span>行为规则，不写则只记录日志</span>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">日志规则：</label>
				<div class="ipt">
					<textarea name="log" class="u-tta u-tta-6" placeholder="记录日志备注时按此规则来生成，支持[变量|函数]。目前变量有：user,time,model,record,data">{$info.log}</textarea>
					<span>记录日志备注时按此规则来生成，支持[变量|函数]。目前变量有：user,time,model,record,data</span>
					<p></p>
				</div>
			</div>
			<div class="formitm formitm-1  formitm-2">
				<input name="id" type="hidden" value="{$info.id}" />
				<button class="u-btn" type="submit">保存</button>
				<button class="u-btn s-btn-c3" type="reset">重置</button>
				<span class="status" id="status"></span> </div>
		</fieldset>
	</form>
</div>
<script>
Do.ready('base','form','dialog',function() {
	$('#form').duxForm({
		returnUrl:'{:U('index')}'
	});

	setValue('type',{$info.type|default=1});
});
</script>
</block>